import lombok.AllArgsConstructor;
import lombok.Data;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.time.LocalDate;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.LockSupport;
import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.Collectors;

@AllArgsConstructor
@Data
public class A implements Comparable <A>{

        private String id;

        private String name;

        @Override
        public boolean equals(Object o) {
                System.out.println("equals()" + o);
                if (this == o) return true;
                if (o == null || getClass() != o.getClass()) return false;
                A a = (A) o;
                return Objects.equals(getId(), a.getId()) && Objects.equals(getName(), a.getName());
        }

        @Override
        public int hashCode() {
                System.out.println("hashCode()" + this.id);
                return 1;
               // return Objects.hash(getId(), getName());
        }

        @Override
        public String toString() {
                return "A{" +
                        "id='" + id + '\'' +
                        ", name='" + name + '\'' +
                        '}';
        }

        public static void main(String[] args) throws UnknownHostException {
                LinkedBlockingDeque<String> queue = new LinkedBlockingDeque<>();
                LockSupport.unpark(null);


                Thread.currentThread().isInterrupted();
                Thread t = new Thread();
                t.interrupt();
                t.interrupted();


        }
        @Override
        public int compareTo(A o) {
                System.out.println(this.id + " compareTo " + o.getId());
                return 1;
        }
}
